package com.gzh.teaching.model.vo;

import com.gzh.core.util.NumericHelper;
import com.gzh.teaching.service.dto.EditCourseIn;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
public class EditCourseParam {

  private String courseId;

  private String status;

  private String courseName;

  private String courseType;

  private String introduce;

  private String scaleOne;

  private String scaleTwo;

  private String scaleThree;

  public EditCourseIn paramToIn(Integer userId) {
    EditCourseIn in = new EditCourseIn();
    in.setCourseId(NumericHelper.toInteger(this.courseId));
    in.setStatus(NumericHelper.toInteger(this.status));
    in.setCourseName(this.courseName);
    in.setCourseType(NumericHelper.toInteger(this.courseType));
    in.setScaleOne(NumericHelper.toInteger(this.scaleOne));
    in.setScaleTwo(NumericHelper.toInteger(this.scaleTwo));
    in.setScaleThree(NumericHelper.toInteger(this.scaleThree));
    in.setIntroduce(this.introduce);
    in.setUserId(userId);
    return in;
  }
}
